<?php

namespace app\common\library;

use fast\Http;

class Ollama
{
    /**
     * 模型列表
     */
    public static function list()
    {
        $ret = json_decode(Http::get(sprintf('%s/api/tags', config('ollama.host'))), true);
        return $ret['models'];
    }
}